package com.example.android.bluetoothchat;

import android.app.Application;
import android.content.Context;
import android.content.Intent;

import com.example.android.bluetoothchat.uitls.ShareUtils;

/**
 * Created by Administrator on 2017/4/23 0023.
 */

public class MyApplication extends Application {
    @Override
    public void onCreate() {
        super.onCreate();
        // 初始化保存文件
        ShareUtils.init(this);
    }

    /**
     * 再按一次退出程序
     *
     * @param me
     */
    public static void moveToBack(Context me) {
        Intent back = new Intent(Intent.ACTION_MAIN);
        back.addCategory(Intent.CATEGORY_HOME);
        me.startActivity(back);
        // me.getParent().moveTaskToBack(true);
        return;
    }
}
